import Http from "../net/Http";
import { UIManager } from "../framework/UIManager";

export default class Api {
    static http:Http = new Http()

    static send(api, cb, params){
        UIManager.Instance.showWaiting()
        this.http.doPost(api,function (res) { 
            cb(res) 
            UIManager.Instance.hideWaiting()
        }, params);
    }

    static send2(api, cb, params){
        this.http.doPost(api,function (res) { 
            cb(res) 
        }, params);
    }

    //登录
    static login(params, cb) {
        Api.send("login",cb, params);
    }
}